package model

import "database/sql"

type ResCompany struct {
	ResCommon
	Name                             string         `json:"name"`
	Email                            sql.NullString `json:"email"`
	Mobile                           sql.NullString `json:"mobile"`
	LogoWeb                          []byte         `json:"logo_web"`
	PartnerId                        int64          `json:"partner_id"`
	CurrencyId                       int64          `json:"currency_id" gorm:"default:7"`
	LayoutBackground                 string         `json:"layout_background" gorm:"default:Blank"`
	FiscalyearLastDay                int            `json:"fiscalyear_last_day" gorm:"default:3"`
	FiscalyearLastMonth              string         `json:"fiscalyear_last_month" gorm:"default:12"`
	AccountOpeningDate               string         `json:"account_opening_date"`
	PlanningGenerationInterval       int            `gorm:"default:6"`
	CurrencyIntervalUnit             string         `gorm:"default:manually"`
	AccountTaxPeriodicityReminderDay int            `gorm:"default:7"`
	AccountTaxPeriodicity            string         `gorm:"default:monthly"`
	TimesheetMailEmployeeInterval    string         `gorm:"default:weeks"`
	TimesheetMailManagerInterval     string         `gorm:"default:weeks"`
	AvalaraEnvironment               string         `gorm:"default:sandbox"`
	//PoLead              float32        `json:"po_lead"`
	//SecurityLead float32    `json:"security_lead"`
	//WelcomeWords string     `json:"welcome_words"`
	UserIds []ResUsers `json:"user_ids" gorm:"many2many:res_company_users_rel;"`
}

type ResCountryState struct {
	ResCommon
	Name      string `json:"name"`
	CountryId int64  `json:"country_id"`
}

type ResCity struct {
	ResCommon
	Name    string `json:"name"`
	StateId int64  `json:"state_id"`
}
type ResArea struct {
	ResCommon
	Name   string `json:"name"`
	CityId int64  `json:"city_id"`
}
